Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/router upgrade #197

Merged
merged 15 commits into from
Dec 21, 2017
Merged

Chore/router upgrade #197

merged 15 commits into from
Dec 21, 2017

Conversation

frickjack
Copy link
Contributor

@frickjack frickjack commented Nov 30, 2017

Upgraded from router v2 to v4. API changed, so:

  • introduced 'ProtectedContent' container to manage access to pages that require auth - replaces withBoxAndNav, withAuthTimeout, and requireAuth wrappers
  • changed access to router-related properties in the code - new router has new and different props
  • also tacked on an optional cache to fetchJsonOrText to avoid repeatedly fetching read-only data like the dictionary and schema
  • introduce do-nothing Jenkinsfile - as place holder

resolve #165

@frickjack frickjack force-pushed the chore/router-upgrade branch from 9cb28e7 to a425799 Compare November 30, 2017 22:46
@@ -1,14 +1,15 @@
import React, { Component } from 'react';
import { Form, FormError, RadioGroup, Radio } from 'react-form';
import { Form, RadioGroup, Radio } from 'react-form';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

router-form v2 doesn't have FormError it seems ... :-(
https://react-form.js.org/#/
https://github.com/react-tools/react-form

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sad :/

still working on some failing tests
was getting stack-overflow warning in console -
bumped up to react-form v2 for Quiz component
so we don't get 'you must login' popups on pages
that don't require auth
* make all pages children of ProtectedContent
* ProtectedContent introduces 'public' property
* ProtectedContent wraps children in Body with
   style property pass-through
* Fix couple jest tests after rebase
@frickjack frickjack force-pushed the chore/router-upgrade branch from 6d6950b to 0f29097 Compare December 5, 2017 21:54
Copy link
Contributor

@thanh-nguyen-dang thanh-nguyen-dang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update to react-router v4
3 participants